﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SSABSZ.SuperEP.Service;
using SSABSZ.SuperEP.Core;

namespace SSABSZ.SuperEP.WinForms
{
    public partial class MainPanel : Form
    {
        SvcHVCEnterpriseProfile svc;

        public MainPanel(ConnectionAddress connectionAddress)
        {
            InitializeComponent();
            svc = new SvcHVCEnterpriseProfile(connectionAddress);

            LoadTree();
        }

        private void LoadTree()
        {
            foreach (var rootKey in svc.GetRootKeys())
            {
                treeKeys.Nodes.Add(rootKey.Name);
            }
        }
    }
}
